Replaces Webpack/Babel/Mocha with Vite/Vitest#484
Replaces Webpack/Babel/Mocha with Vite/Vitest#484ralexmatthews wants to merge 7 commits intoEasyPost:masterfrom ralexmatthews:use-vite
Conversation
|
The GitHub CI file is missing the Node version matrix for the |
|
@nwithan8 Yea thats intentional. The project doesn't build on node 12, 14, or 16 anymore. It will still run the built version on those versions though. Thats what the |
Alright, we'll remove those as required CI checks then |
Description
I decided to start with a much smaller problem to tackle, so this only removes Webpack/Babel/Mocha with Vite/Vitest. I chose Vite/Vitest because that it what Easy-UI uses for its builds and tests.
There is a lot of files changed, but all changes are actually pretty minimal. All this does really is:
this.references in the testsAnd thats effectively it. All commands still work as is. There are no changes to the source, and the output file is effectively the same. This does mean that it hasn't fixed any of the weird issues with using the project in Next.js and stuff. That can come at a later date since that will likely require breaking changes to fix.
Overall, this removes like half of the project's deps, and with it, the security vulnerabilities in exchange for a modern toolset.
Testing
All unit tests are passing. In added another test/check specifically for checking compatibility with older node versions. It basically just imports the project and tries to create a test shipment. This makes it so we can test compatibility with old node versions while not requiring the toolchain to support old node versions.
I also tested it with using actual API calls with a minimal project using node 12 and 22 and saw it working. I also checked node 10 and confirmed that did not work.
Pull Request Type
Please select the option(s) that are relevant to this PR.